package org.ellwood.core.utils;

import org.ellwood.core.common.service.ConfService;

/**
 * @ProjectName: ellwood-boot-pro
 * @PackageName: org.ellwood.core.utils
 * @ClassName: SysConfigUtils
 * @Description: // 获取sysConf信息方法
 * @Author: Ellwood
 * @CreateDate: 2024/6/14 - 下午4:49
 * @Version: V1.0.0
 */
public class SysConfigUtils {

    /**
     * 根据可以获取config value
     * @param key key
     * @return 返回config信息
     */
    public static String getConfValue(String key){
        ConfService confService = EllSpringAppContextUtils.getBean(ConfService.class);
        return confService.getConfValue(key);
    }

    /**
     * 判断是否存在该key的配置信息
     * @param key key
     * @return true/false
     */
    public static boolean hasConf(String key){
        ConfService confService = EllSpringAppContextUtils.getBean(ConfService.class);
        return confService.hasConfKey(key);
    }

}
